﻿CREATE TABLE [dbo].[RulajeSablon] (
    [IDSablonRulaj]     INT           IDENTITY (1, 1) NOT NULL,
    [IDSablon]          INT           NOT NULL,
    [OptiuneContDebit]  SMALLINT      CONSTRAINT [DF_RulajeSablon_OptiuneContDebit] DEFAULT ((0)) NOT NULL,
    [OptiuneContCredit] SMALLINT      CONSTRAINT [DF_RulajeSablon_OptiuneContCredit] DEFAULT ((0)) NOT NULL,
    [OptiuneValoareLei] SMALLINT      CONSTRAINT [DF_RulajeSablon_OptiuneValoareLei] DEFAULT ((0)) NOT NULL,
    [DataDocJust]       DATETIME      NULL,
    [TipDocJust]        VARCHAR (10)  NULL,
    [NumarDocJust]      DECIMAL (18)  NULL,
    [ExplicatiiDocJust] VARCHAR (200) NULL,
    CONSTRAINT [PK_RulajeSablon] PRIMARY KEY CLUSTERED ([IDSablonRulaj] ASC),
    CONSTRAINT [FK_RulajeSablon_RulajeDocSablon] FOREIGN KEY ([IDSablon]) REFERENCES [dbo].[RulajeDocSablon] ([IDSablon])
);

